/* case_create.css - 完整版 */
.edit-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 15px;
}

.config-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 1.8rem;
    position: relative;
}

.global-config-card {
    overflow: visible;
}

.action-buttons-top {
    position: absolute;
    top: 18px;
    right: 22px;
    display: flex;
    gap: 10px;
    z-index: 100;
}

.form-grid label {
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

/* 步骤列表容器 */
.step-list-card {
    width: 320px;
    height: calc(100vh - 560px);
    min-width: 300px;
    border-right: 1px solid #e0e4e9;
    padding: 0;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.step-items-container {
    overflow-y: auto;
    flex: 1;
    padding: 12px;
}

.step-items {
    padding-right: 5px;
}

/* 步骤卡片 */
.step-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin: 8px 0;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.step-item.active {
    border-color: #3b82f6;
    background: #f0f4ff;
    box-shadow: 0 2px 6px rgba(59,130,246,0.15);
    transform: translateX(3px);
}

.step-item:hover:not(.active) {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* 删除按钮 */
.delete-step {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
    color: #dc3545;
    font-size: 16px;
    transition: all 0.2s;
    background: none;
    border: none;
    padding: 4px;
    display: block !important;
    line-height: 1;
}

.delete-step:hover {
    opacity: 1;
    background: rgba(220,53,69,0.1);
    border-radius: 50%;
}

/* 编辑器区域 */
.step-editor-card {
    flex: 1;
    min-height: 650px;
    margin-left: 25px;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.config-tabs {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nav-tabs {
    border-bottom: 2px solid #e5e7eb;
}

.nav-link {
    color: #64748b;
    border: none;
    padding: 0.75rem 1.25rem;
}

.nav-link.active {
    color: #3b82f6;
    border-bottom: 2px solid #3b82f6;
}

.tab-content {
    flex: 1;
    padding: 1.5rem 0;
}

.editor-textarea {
    font-family: 'Fira Code', monospace;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 15px;
    font-size: 14px;
    line-height: 1.6;
    height: 300px;
    resize: vertical;
}

/* 证书验证 */
.cert-path-group {
    display: none;
    animation: fadeIn 0.3s ease;
    margin-top: 12px;
}

#verifyCert:checked ~ .cert-path-group {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 响应式设计 */
@media (max-width: 992px) {
    .step-list-card {
        width: 100%;
        height: auto;
        max-height: 400px;
        margin-right: 0;
        border-right: none;
        margin-bottom: 1.5rem;
    }

    .step-editor-card {
        margin-left: 0;
        min-height: 500px;
    }

    .action-buttons-top {
        position: static;
        justify-content: flex-end;
        margin-top: 1rem;
    }

    .config-tabs {
        min-height: 400px;
    }
}

/* 辅助样式 */
.text-muted {
    color: #6b7280 !important;
    font-size: 0.85em;
}

.bi-trash {
    vertical-align: -0.125em;
}